package com.pxxy.cels.util;

/**
 * @program: Cels
 * @package: qikran.cels.util
 * @description: ${对中文字符串进行修剪  去掉[]}
 * @author: qi_kran
 * @create: 2020-04-06 18:10
 **/
public class StringUtil {
    /**
     *  除去字符串中的[]
     * @param string
     * @return
     */
    public static String  trimChar(String string){
        return string.replace("[", "").replace("]", "");
    }

    public static boolean compareString(String s1,String[] s2){
        for (String s:s2){
            if (s1.trim().equals(s.trim())){
                return true;
            }
        }
        return false;
    }
}
